package com.ruoyi.meow.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.meow.mapper.MeowCustomerMapper;
import com.ruoyi.meow.domain.MeowCustomer;
import com.ruoyi.meow.service.IMeowCustomerService;
import com.ruoyi.common.core.text.Convert;

/**
 * 客户管理Service业务层处理
 * 
 * @author JRMT
 * @date 2025-06-23
 */
@Service
public class MeowCustomerServiceImpl implements IMeowCustomerService 
{
    @Autowired
    private MeowCustomerMapper meowCustomerMapper;

    /**
     * 查询客户管理
     * 
     * @param customerId 客户管理主键
     * @return 客户管理
     */
    @Override
    public MeowCustomer selectMeowCustomerByCustomerId(String customerId)
    {
        return meowCustomerMapper.selectMeowCustomerByCustomerId(customerId);
    }

    /**
     * 查询客户管理列表
     * 
     * @param meowCustomer 客户管理
     * @return 客户管理
     */
    @Override
    public List<MeowCustomer> selectMeowCustomerList(MeowCustomer meowCustomer)
    {
        return meowCustomerMapper.selectMeowCustomerList(meowCustomer);
    }

    /**
     * 新增客户管理
     * 
     * @param meowCustomer 客户管理
     * @return 结果
     */
    @Override
    public int insertMeowCustomer(MeowCustomer meowCustomer)
    {
        meowCustomer.setCreateTime(DateUtils.getNowDate());
        return meowCustomerMapper.insertMeowCustomer(meowCustomer);
    }

    /**
     * 修改客户管理
     * 
     * @param meowCustomer 客户管理
     * @return 结果
     */
    @Override
    public int updateMeowCustomer(MeowCustomer meowCustomer)
    {
        meowCustomer.setUpdateTime(DateUtils.getNowDate());
        return meowCustomerMapper.updateMeowCustomer(meowCustomer);
    }

    /**
     * 批量删除客户管理
     * 
     * @param customerIds 需要删除的客户管理主键
     * @return 结果
     */
    @Override
    public int deleteMeowCustomerByCustomerIds(String customerIds)
    {
        return meowCustomerMapper.deleteMeowCustomerByCustomerIds(Convert.toStrArray(customerIds));
    }

    /**
     * 删除客户管理信息
     * 
     * @param customerId 客户管理主键
     * @return 结果
     */
    @Override
    public int deleteMeowCustomerByCustomerId(String customerId)
    {
        return meowCustomerMapper.deleteMeowCustomerByCustomerId(customerId);
    }
}
